//显示对应的新闻图片，链接，文字
function  showPic(whichPic) {
    //显示新闻图片的对象
    var placeholder = document.getElementById("placeholder");
    //显示新闻标题和链接对象
    var description = document.getElementById("description");
    //显示图片，数据内容
    var  imgSrc = whichPic.getAttribute("data-image");
    //标题
    var newsTitle = whichPic.getAttribute("title");
    //链接地址
    var url = whichPic.getAttribute("data-url");
    console.log(imgSrc + "|" + newsTitle+"|" + url);

    //设置内容
    placeholder.setAttribute("src",imgSrc);
    description.setAttribute("href",url);
    description.innerText = newsTitle;
}
